package com.kaifamiao.demo.d0827;

import java.io.File;

public class Demo02 {

    public static void main(String[] args) {
        File file = new File("D:\\workspace\\idea_workspace_kfm4\\demo\\a.txt");
        File file1 = new File("D://workspace\\idea_workspace_kfm4\\demo\\a.txt");

        System.out.println(file.exists());
        System.out.println(file1.exists());

        // file.toString  --> file.getPath()
        System.out.println(file.getPath());
        System.out.println(file1.getPath());

//        System.out.println(file.compareTo(file1));

        File file2 = new File("d:\\temp\\abc");

//        System.out.println(file2.delete());
        System.out.println(file2.length());
    }
}
